latestSwagger 2.0ShopBase Dev 1.02026-08-10153268547.4 KB

353ccde6240d

Fulfillment

Create a fulfillment.

Create a fulfillment for the specified order and line items.

The fulfillment's status depends on the line items in the order:

  • If the line items in the fulfillment use a manual or custom fulfillment service, then the status of the returned fulfillment will be set immediately.

  • If the line items use an external fulfillment service, then they will be queued for fulfillment and the status will be set to pending until the external fulfillment service has been invoked.

A fulfillment might then transition to open, which implies it is being processed by the service, before transitioning to success when the items have shipped. If you don't specify line item IDs, then all unfulfilled and partially fulfilled line items for the order will be fulfilled. However, if an order is refunded or if any of its individual line items are refunded, then the order can't be fulfilled.

post/admin/orders/{order_id:[0-9]+}/fulfillments.json

Path parameters

order_idinteger required

Order ID

Request body

Example request

{
  "fulfillment": {
    "line_items": [
      {
        "id": 1234,
        "quantity": 1
      }
    ],
    "service": "ali-dropship-connector",
    "tracking_company": "17track.net",
    "tracking_number": "LO55960699CN",
    "tracking_url": "https://t.17track.net/en#nums=LO55960699CN",
    "tracking_urls": [
      "https://t.17track.net/en#nums=LO55960699CN"
    ]
  }
}

Response

OK

claim_idinteger

the claim id of fulfillment

created_atinteger

The date and time when the fulfillment was created. The API returns this value in ISO 8601 format.

date_doneinteger

The date and time (ISO 8601 format) when the fulfillment was fulfilled.

detected_tracking_companystring

Detected tracking company

first_tracking_step_atinteger

The date and time when the first tracking step created

idinteger

The ID for the fulfillment.

last_crawled_atinteger

The date and time when the fulfillment was last crawled

last_mile_tracking_companystring

The tracking company when the package arrived at destination country

last_mile_tracking_numberstring

The tracking number of packages when arrived at destination country

last_tracking_step_atinteger

The date and time when the last tracking step created

namestring

The uniquely identifying fulfillment name, consisting of two parts separated by a .. The first part represents the order name and the second part represents the fulfillment number. The fulfillment number automatically increments depending on how many fulfillments are in an order (e.g. #1001.1, #1001.2).

notify_customerboolean

Whether the customer should be notified. If set to true, then an email will be sent when the fulfillment is created or updated. For orders that were initially created using the API, the default value is false. For all other orders, the default value is true.

order_idinteger

The unique numeric identifier for the order.

send_delay_mailboolean

check send email delay shipping

servicestring

The uniquely identifying fulfillment name, consisting of two parts separated by a .. The first part represents the order name and the second part represents the fulfillment number. The fulfillment number automatically increments depending on how many fulfillments are in an order (e.g. #1001.1, #1001.2).

shipment_statusstring

The current shipment status of the fulfillment. Valid values </br>label_printed: A label for the shipment was purchased and printed. </br>label_purchased: A label for the shipment was purchased, but not printed. </br>attempted_delivery: Delivery of the shipment was attempted, but unable to be completed. </br>ready_for_pickup: The shipment is ready for pickup at a shipping depot. </br>confirmed: The carrier is aware of the shipment, but hasn't received it yet. </br>in_transit: The shipment is being transported between shipping facilities on the way to its destination. </br>out_for_delivery: The shipment is being delivered to its final destination. </br>delivered: The shipment was succesfully delivered. </br>failure: Something went wrong when pulling tracking information for the shipment, such as an invalid tracking number or the shipment was cancelled.

statusstring

The status of the fulfillment. Valid values </br>pending: The fulfillment is pending. </br>open: The fulfillment has been acknowledged by the service and is in processing. </br>success: The fulfillment was successful. </br>cancelled: The fulfillment was cancelled. </br>error: There was an error with the fulfillment request. </br>failure: the fulfillment request failed. </br>processing: the fulfillment request is in processing.

tracking_companystring

The name of the tracking company.

tracking_numberstring

A trackping number, provided by the shipping company

tracking_numbersstring[]

A list of tracking numbers, provided by the shipping company.

tracking_stepsobject

Tracking steps object

tracking_urlstring

Link to tracking pag

tracking_urlsstring[]

The URLs of tracking pages for the fulfillment.

updated_atinteger

The date and time (ISO 8601 format) when the fulfillment was last modified.

variant_inventory_managementstring

The name of the inventory management service.

Example response

{
  "id": 255858046,
  "name": "255858046",
  "notify_customer": true,
  "order_id": 450789469,
  "service": "255858046",
  "shipment_status": "confirmed",
  "status": "255858046",
  "tracking_company": "4PX",
  "tracking_number": "1Z2345",
  "tracking_numbers": [
    "112345Z2345"
  ],
  "tracking_url": "http://example.com/etracking/tracking.cgi?InquiryNumber1=1Z2345&TypeOfInquiryNumber=T&AcceptUPSLicenseAgreement=yes&submit=Track",
  "tracking_urls": [
    "http://track-example.com/startairmail.php?code=112345Z2345"
  ],
  "variant_inventory_management": "shopbase"
}